﻿//-----------------------------------------------------------------------
// <copyright file="HomeControllerTest.cs" company="Christian Coda">
// Copyright (c) Christian Coda. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DancingSite.Tests.Controllers
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Web.Mvc;
    using DancingSite;
    using DancingSite.Controllers;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    /// <summary>
    /// Test class for the HomeController.
    /// </summary>
    [TestClass]
    public class HomeControllerTest
    {
        /// <summary>
        /// Test the index method.
        /// </summary>
        [TestMethod]
        public void HomeController_Index()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("Find Dancing Events Near You.", result.ViewBag.Message);
        }

        /// <summary>
        /// Test the about method
        /// </summary>
        [TestMethod]
        public void HomeController_About()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.About() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("Your app description page.", result.ViewBag.Message);
        }

        /// <summary>
        /// Test the contact method.
        /// </summary>
        [TestMethod]
        public void HomeController_Contact()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.Contact() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("Your contact page.", result.ViewBag.Message);
        }

        /// <summary>
        /// Test the contact method.
        /// </summary>
        [TestMethod]
        public void HomeController_Dances()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.Dances() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("Dances page.", result.ViewBag.Message);
        }
    }
}
